package com.soul.bootfeign.controller;

import com.soul.bootfeign.service.FeignService;
import com.soul.bootfeign.service.TestFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign")
public class FeignController {

    @Autowired
    private FeignService feignService;
    
    @Autowired
    private TestFeign testFeign;

    @GetMapping("")
    public String feign() {
        String hello = feignService.hello();
        return hello;
    }
    
    @GetMapping("test")
    public String test(){
        return testFeign.index();
    }

}
